// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store';
import 'lib-flexible/flexible'
Vue.config.productionTip = false
import cookie from './assets/js/cookie'
global.cookie = cookie;

import http from './api/http'
Vue.prototype.$http = http;

import {DatetimePlugin, ConfirmPlugin, LoadingPlugin, ToastPlugin, AlertPlugin } from 'vux'
Vue.use(DatetimePlugin)
Vue.use(ConfirmPlugin)
Vue.use(LoadingPlugin)
Vue.use(ToastPlugin)
Vue.use(AlertPlugin)
Vue.prototype.$toast = function (text) {
    this.$vux.toast.text(text,'middle')
}

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
    store,
  components: { App },
  template: '<App/>'
})
